﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_Master/AdminMaster2.master" AutoEventWireup="true" 
CodeFile="LotteryBuyTogether.aspx.cs" Inherits="LotteryBuyTogether" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="apply">
  <div class="apply2">
   <%--<uc_left_m:left_menu ID="left_m1" runat="server" />--%>
    <div class="myul_r">
      <div class="mod_pad4">
<div class="hd_admin"> <strong>合买彩票信息，确认开奖后请记得派奖</strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</div> 
<div class="admin_tab_box1"><br /> 
    <label class="bold green1">请选择种类：</label><asp:dropdownlist runat="server" id="caipiaoType" autopostback="true"
              onselectedindexchanged="caipiaoType_SelectedIndexChanged"  >
    <asp:ListItem value="1">双色球</asp:ListItem> 
<asp:ListItem value="2">大乐透</asp:ListItem> 
<asp:ListItem value="3">排列三</asp:ListItem> 
<asp:ListItem value="4">排列五</asp:ListItem> 
<asp:ListItem value="5">福彩3D</asp:ListItem> 
<asp:ListItem value="6">七星彩</asp:ListItem> 
<asp:ListItem value="7">七乐彩</asp:ListItem>
    </asp:dropdownlist> 请输入期数：<asp:textbox runat="server" maxlength="7" id="TextQS"></asp:textbox>
    <asp:button runat="server" text="查询" onclick="Unnamed2_Click" /> &nbsp; &nbsp;<asp:button id="exportBtn" runat="server" text="导出" 
                 onclick="exportBtn_Click"/><br /><br /> 
                 注意：开始派奖之前请选择彩票类型，以及输入派奖期数，并且点击查询按钮后，方可派奖.<br /><br />
    <input type="button"  id="startSystem" value="开始系统派奖"  onclick="javascript:startSystem_Click(<%=type %>,<%=qs %>)" />
          <div class="clear"></div>
       <div class="coupons">
            <table class="w top20" width="1060" border="0" cellspacing="0" cellpadding="0" >
              <tr class="t">
                <td style=" width:100px;">发起人编号</td>   
                <td style=" width:260px;">方案标题</td>          
                <td style=" width:100px;">期数</td>     
                <td style=" width:100px;">注数</td>            
                <td style=" width:100px;">倍数</td>           
                <td style=" width:500px;">购买号码</td>  
                <td style=" width:200px;">是否已派奖</td>  
              </tr>            
              <%if (lottery != null && lottery.Count > 0)
                { %>
                <%for (int k = 0; k < lottery.Count; k++)
                  { %>
              <tr >
                <td style=" width:100px;"><%=lottery[k].UserID%></td>       
                <td style=" width:260px;"><%=lottery[k].Name%></td>     
                <td style=" width:100px;">第<%=lottery[k].LotteryOpenTime%>期</td>     
                <td style=" width:100px;"><%=lottery[k].LotteryCount%></td>      
                <td style=" width:100px;"><%=lottery[k].LotteryMultiple%></td>   
                <td style=" width:500px;"><%=Bind(lottery[k].id)%></td> 
                <td style=" width:200px;"><%=lottery[k].Flag==false?"未派奖":"已派奖"%></td>   
              </tr>
              <%} %>
              <%}
                else
                { %>
             <tr>
                <td  colspan="7" style=" width:1060px;"><div class='no_data'>^_^&nbsp;&nbsp;没有符合条件的数据！</div></td>
              </tr> 
              <%} %>             
            </table>
          </div>
          <div style="text-align:center"> <webdiyer:aspnetpager SubmitButtonClass="buttons"  ID="AspNetPager1" 
                    runat="server" AlwaysShow="True" FirstPageText="首页"
                        NextPageText="下一页" PrevPageText="前一页" LastPageText="尾页" PageSize="10"  
                        OnPageChanged="AspNetPager1_PageChanged">
                    </webdiyer:aspnetpager></div> 
        </div>
      </div>
    </div> 
  </div> 
</div> <script type="text/javascript">
           function startSystem_Click(lotteryType, lotteryQs) {
               if (lotteryType == 0) {
                   alert("请选择彩票类型！");
                   return;
               } else if (lotteryQs == "2014000") {
                   alert("请输入期数,并点击查询按钮！");
                   return;
               } else {
                   if (confirm("由于数据过多，系统派奖时间会很长，请不要重复点击，请您确认后耐心等待...")) {
                       $.post("/Ajax/SubmitTogether.aspx", { type: lotteryType, qs: lotteryQs }, function (data) {
                           if (data == "success") {
                               alert("派奖成功，请查看！");
                           }
                           else {
                               alert("派奖失败,请核对您输入的信息是否正确！");
                           }
                       }, "text");
                   }
               }
           }
</script>
 
</asp:Content>